#ifndef OFFERMANAGERMAINWINDOW_H
#define OFFERMANAGERMAINWINDOW_H

#include "global.h"
#include <QMainWindow>
#include <QSqlTableModel>

class QTreeWidgetItem;
class CompanyManagement;
class JobManagement;

namespace Ui {
class OfferManagerMainWindow;
}

class OfferManagerMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit OfferManagerMainWindow(QWidget *parent = 0);
    ~OfferManagerMainWindow();
    CompanyManagement *companyManagement;
//    JobManagement *jobManagement;

private:
    Ui::OfferManagerMainWindow *ui;
    QSqlDatabase database;
    QMap<QString, QSqlTableModel*> databaseTables;


    QSqlTableModel *tableViewModel();

private slots:
    void onTreeWidgetCurrentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
    void onInsertRecord();
    void onDeleteRecord();
    void onUpdateRecord();
    void refreshDatabaseTables();
};

#endif // OFFERMANAGERMAINWINDOW_H
